#ifndef OPTIONS_H
#define OPTIONS_H

#include <QtGui/QWidget>
#include <QSettings>
#include <QCloseEvent>
#include <QDir>
#include <QDesktopWidget>

namespace Ui {
    class OptionsDialog;
}

class Options : public QWidget {
    Q_OBJECT
    Q_DISABLE_COPY(Options)
protected:
    void closeEvent(QCloseEvent *event);
public:
    explicit Options(QWidget *parent = 0);
    virtual ~Options();
    void showOptions(bool *mStop, bool *mStopSleep);
    void hideOptions();
    void save();
    void load();
    QString email;
    bool isCrypted;
    QString password;
    int timeout;
    bool autostart;
    bool useProxy;
    QString proxyHost;
    int proxyPort;
    bool useAuthorization;
    QString proxyUserName;
    QString proxyPassword;
    bool optionsWindowActive;

protected:
    virtual void changeEvent(QEvent *e);

private:
    Ui::OptionsDialog *m_ui;
    bool *running;
    bool *stopSleep;

private slots:
    void on_cancelButton_clicked();
    void on_acceptButton_clicked();
    void on_useAuthorizationBox_stateChanged(int );
    void on_useProxyBox_stateChanged(int );
};

#endif // OPTIONS_H
